﻿<div class="container form-horizontal">
    <update-meta property="og:title" content="Penang Realty世界地產 Recent Transactions" />
    <update-meta property="og:url" content="http://www.penangrealty.my/RecentTransaction" />
    <notification-panel></notification-panel>
    
    <div class="container" style="background-color:#FF6347;background-size:100%;padding-top:20px;border-radius:20px">
    <div class="form-group">
        <label class="col-sm-2 control-label" style="color:black;font-size:12pt" pop-over-html pop-over-content='view'>Transaction Type</label>
        <div class="col-sm-10">
            <div class="btn-group" role="group" aria-label="..." ng-init="property.saleType = 'S'">
                <button type="button" class="btn btn-default" ng-class="{'active' : property.saleType == 'S'}" ng-click="property.saleType = 'S'">Sale</button>
                <button type="button" class="btn btn-default" ng-class="{'active' : property.saleType == 'R'}" ng-click="property.saleType = 'R'">Rent</button>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label" style="color:black;font-size:12pt">Property Type</label>
        <div class="col-sm-10">
            <div class="btn-group" role="group" aria-label="..." ng-init="property.type = 'INDUSTRI'">
                <button type="button" class="btn btn-default" ng-repeat="(i,item) in propertyType" ng-class="{'active' : property.type == item.sqlName}" ng-click="property.type = item.sqlName">{{item.displayName}}</button>
            </div>
        </div>
    </div>

    <!--<div class="form-group">
        <label class="col-sm-2 control-label">Transaction Type</label>
        <div class="col-sm-10">
            <select name="Mode" ng-model="property.saleType" class="form-control" ng-selected="property.saleType" ng-init="property.saleType = ''" required>
                <option style="display:none" value="">Select</option>
                <option value="Sale">SALE</option>
                <option value="Rent">RENT</option>
            </select>

        </div>
        
    </div>


    <div class="form-group">
        <label class="col-sm-2 control-label">Property Type</label>
        <div class="col-sm-10">
            <select ng-model="property.type" class="form-control">
                <option style="display:none" value="">Select</option>
                <option value="{{item.sqlName}}" ng-repeat="(i,item) in propertyType"> {{item.displayName}}
                </option>
            </select>
        </div>
    </div>-->

    <div class="form-group">
        <label for="location" class="col-sm-2 control-label" style="color:black;font-size:12pt">Location Keyword</label>
        <div class="col-sm-10">
            <input class="form-control" ng-model="property.keyword" required placeholder="Road/Project Name eg: Delima"/>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-2 control-label" style="color:black;font-size:12pt">District</label>
        <div class="col-sm-10">
            <select ng-model="property.district" class="form-control" ng-selected="property.district"
                    ng-options="district for district in districts">
                <option style="display:none" value="">Select</option>
                {{district}}
            </select>
        </div>
    </div>

    <div class="col-sm-10 col-sm-offset-2">
        <button type="submit" ng-click="clearEntry()" class="btn btn-primary ">Clear</button>
        <button type="submit" ng-click="search()" class="btn btn-primary pull-right">Search</button>
    </div>
    </div>
    <h3> Search results </h3>
    <div>
        <table ng-table="tableParams" class="table table-striped" show-filter="true">
            <!--<thead>-->
                <tr ng-repeat="data in $data">
                    <td data-title="'Address'" sortable="'Address'" class="col-md-2" filter="{ 'Address': 'text'}">{{data.Alamat}}</td>
                    <td data-title="'Project Name'" sortable="'Kawasan'" class="col-md-2" filter="{ 'Kawasan': 'text'}">{{data.Kawasan}}</td>
                    <td data-title="'Price'" sortable="'Price'" align="center" class="col-md-1" filter="{ 'Price': 'text'}">{{data.Price | number}}</td>
                    <td data-title="'Land Type'" sortable="'LandType'" class="col-md-1" filter="{ 'LandType': 'text'}">{{data.LandType}}</td>
                    <td data-title="'Property Type'" sortable="'PropertyType'" class="col-md-1" filter="{ 'PropertyType': 'text'}">{{data.PropertyType}}</td>
                    <td data-title="'Land Area(m.sq)'" sortable="'Land'" align="center" class="col-md-1" filter="{ 'Land': 'text'}">{{data.Land}}</td>
                    <td data-title="'Build Up(m.sq)'" sortable="'BuildUp'" align="center" class="col-md-1" filter="{ 'BuildUp': 'text'}">{{data.BuildUp}}</td>
                    <td data-title="'Transaction Date'" sortable="'TransactionDate'" align="right" class="col-md-1" filter="{ 'TransactionDate': 'text'}">{{data.TransactionDate  | date:"MM/dd/yyyy"}}</td>
                </tr>
            <!--</thead>-->
            <tr>
                <td><strong>Count per page:</strong> {{tableParams.count()}}</td>
                <td colspan="8" align="right">
                    <p><strong>Page:</strong> {{tableParams.page()}} </p>
                </td>
            </tr>

        </table>
    </div>

</div>



